<?php
//include "../code/login_proxy.php";
include "../code/config.php";

if (isset($_POST['back'])){
	header('location: list2.php');}
if (isset($_POST['log'])){
	header('location: ../code/logout.php');}
?>
<html>
<head>
<title>Home Pengrajin</title>
<meta name="generator"
    content="HTML Tidy for Windows (vers 14 February 2006), see www.w3.org" />
    <!-- Bootstrap -->
	<link rel="stylesheet" type="css/text" href="../css/bootstrap.css" />
	<link rel="stylesheet" type="css/text" href="../css/style.css" />
		<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/animate.js"></script>
<style type="text/css">
<!--
.style1 {
	font-size: 12px;
	color: #000099;
	font-family: Georgia, "Times New Roman", Times, serif;
}
.style2 {font-family: Georgia, "Times New Roman", Times, serif}
-->
</style>
</head>
<body>
	
	<div class="style3">
	  <div align="center" class="style2">
		<pre class="style3 style1 style1">
	
		SELAMAT DATANG
		-- Komunitas Batik Pamekasan --</pre>
			  <BR><BR>
	  </div>
	</div>

	<div class="container-fluid">
	  <div class="row-fluid">
		<div class="span2">
		  <p><img src="../img/logo_kobatpam.jpg" width="250" height="150"
		  <BR>
		  <address>
		    <strong>Komunitas Batik Pamekasan</strong><br>
					  Jl.Jokotole, Pamekasan <br>
					  Madura, 60111<br>
					  <abbr title="Phone">P:</abbr> (031) 5994251
		  </address>
					 
					<address>
					<strong>KOBATPAM</strong><br>
					  <a href="mailto:#">kobatpam@gmail.com</a>
					</address>

					 <ul><li>SEJARAH</li>
					  <li>TIPS-TRIK</li>
			        </ul>
					<div>
					
				<form method="post" action="invest.php">
					<button name="back" class="btn btn-primary" type="submit">Back</button>
					<button name="log" class="btn btn-danger" type="submit">Log Out</button>
				</form>
			</div>
		</div>
		
		<div class="span8">
		  
<pre class="style3 style1">INVESTASIKAN DANA ANDA KEPADA PENGRAJIN
					</pre>


<table border="1" cellpadding="3" cellspacing="0">

<?php
$id=$_GET['id'];
$query=" SELECT * FROM pengrajin WHERE id_dagang = '$id' ";

$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();


$i=0;
while ($i < $num) {
//$idd=mysql_result($result,$i,"id_dagang");
$idd=mysql_result($result,$i,"id_dagang");
$nama=mysql_result($result,$i,"nama_usaha");
$alamat=mysql_result($result,$i,"alamat_usaha");
$telp=mysql_result($result,$i,"telp_usaha");
$profil=mysql_result($result,$i,"profil_usaha");
$gambar=mysql_result($result,$i,"gmbar_usaha");
++$i;
}
 
 ?>
 <form action="../code/input_invest.php?idinv=<?php echo $id?>" method="post" enctype="multipart/form-data"> 
  <table>
<tr>
<td>Id Dagang :</td>
<td><?php echo $idd; ?></td>
 </tr>
 <tr>
<td>Nama Usaha :</td>
<td><?php echo $nama; ?></td>
 </tr>
<tr>
 <td>Alamat :</td>
<td><?php echo $alamat; ?></td>
</tr>
<tr>
<td>Telpon :</td>
 <td><?php echo $telp; ?></td>
</tr>
<tr>
<td>Profil :</td>
<td><?php echo $profil; ?></textarea></td>
</tr>
 <tr>
 <td>Gambar :</td>
 <td><img src="<?php echo $gambar; ?>" width="250" height="150" class="img-rounded" />
 </td>
 </tr>
 <tr>
   <td>Nominal Investasi :</td>
  <td><input type="text" name="inv" size="30" value="" ></td>
   </tr>
   <tr>
   <td>Keterangan:</td>
  <td><textarea name ="ket" placeholder="Masukkan keterangan terkait investasi anda" rows="6" required ></textarea></td>
   </tr>
   <tr>
   <td>Tanggal Investasi</td>
   <td><input type="date" name="tgl" size="50" value="pilih tanggal" ></td>
   </tr>
   </table>
  
   <p>
 <BR><BR>
 <button class="btn btn-primary" type="submit" name="submit">Submit</button>
 <button class="btn" type="submit">Cancel</button>
</form>
</body>
</html>

<br>


</pre>
		</div>
		
	  </div>
	</div>

</body>
</html>